package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Lob;
import java.io.Serializable;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisualRecord} entity.
 */
@ApiModel(description = "数据集")
public class BladeVisualRecordDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String name;

    /**
     * URL
     */
    @ApiModelProperty(value = "URL")
    private String url;

    /**
     * 数据类型
     */
    @ApiModelProperty(value = "数据类型")
    private Integer dataType;

    /**
     * 请求方法
     */
    @ApiModelProperty(value = "请求方法")
    private String dataMethod;

    /**
     * 请求头
     */
    @ApiModelProperty(value = "请求头")
    private String dataHeader;

    /**
     * 数据
     */
    @ApiModelProperty(value = "数据")
    @Lob
    private String data;

    /**
     * 数据查询
     */
    @ApiModelProperty(value = "数据查询")
    private String dataQuery;

    /**
     * 数据查询类型
     */
    @ApiModelProperty(value = "数据查询类型")
    private String dataQueryType;

    /**
     * 数据格式化器
     */
    @ApiModelProperty(value = "数据格式化器")
    @Lob
    private String dataFormatter;

    /**
     * WS地址
     */
    @ApiModelProperty(value = "WS地址")
    private String wsUrl;


    /**
     * 数据库SQL
     */
    private String dbsql;


    /**
     * sql语句
     */
    @Lob
    private String sql;


    /**
     * 结果
     */
    private String result;


    /**
     * mqtt地址
     */
    private String mqttUrl;


    /**
     * mqtt配置
     */
    @Lob
    private String mqttConfig;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    private Integer isDeleted = 0;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getDataType() {
        return dataType;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }

    public String getDataMethod() {
        return dataMethod;
    }

    public void setDataMethod(String dataMethod) {
        this.dataMethod = dataMethod;
    }

    public String getDataHeader() {
        return dataHeader;
    }

    public void setDataHeader(String dataHeader) {
        this.dataHeader = dataHeader;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getDataQuery() {
        return dataQuery;
    }

    public void setDataQuery(String dataQuery) {
        this.dataQuery = dataQuery;
    }

    public String getDataQueryType() {
        return dataQueryType;
    }

    public void setDataQueryType(String dataQueryType) {
        this.dataQueryType = dataQueryType;
    }

    public String getDataFormatter() {
        return dataFormatter;
    }

    public void setDataFormatter(String dataFormatter) {
        this.dataFormatter = dataFormatter;
    }

    public String getWsUrl() {
        return wsUrl;
    }

    public void setWsUrl(String wsUrl) {
        this.wsUrl = wsUrl;
    }

    public String getDbsql() {
        return dbsql;
    }

    public void setDbsql(String dbsql) {
        this.dbsql = dbsql;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getMqttUrl() {
        return mqttUrl;
    }

    public void setMqttUrl(String mqttUrl) {
        this.mqttUrl = mqttUrl;
    }

    public String getMqttConfig() {
        return mqttConfig;
    }

    public void setMqttConfig(String mqttConfig) {
        this.mqttConfig = mqttConfig;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualRecordDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualRecordDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    @Override
    public String toString() {
        return "BladeVisualRecordDTO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", dataType=" + dataType +
                ", dataMethod='" + dataMethod + '\'' +
                ", dataHeader='" + dataHeader + '\'' +
                ", data='" + data + '\'' +
                ", dataQuery='" + dataQuery + '\'' +
                ", dataQueryType='" + dataQueryType + '\'' +
                ", dataFormatter='" + dataFormatter + '\'' +
                ", wsUrl='" + wsUrl + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }
}
